package com.smedi.ismedi.inmail.api.dto.request.appVersion;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @className: AppVersionUpdateRequest
 * @Description: TODO
 * @version: v1.0.0
 * @author: wzx
 * @date: 2023/8/30 10:35
 */

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "APP版本更新")
public class AppVersionUpdateRequest implements Serializable {
    /**
     *  id
     */
    @NotNull(message = "id为空!")
    @ApiModelProperty(value = "id", required = true)
    private Long id;

    /**
     *  版本号
     */
    @NotBlank(message = "版本号为空!")
    @ApiModelProperty(value = "版本号", required = true)
    @Size(max = 100,message = "版本号的长度不能超过100")
    @Pattern(regexp = "^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$", message = "本地版本格式错误，应例如1.0.1！")
    private String appVersion;
    /**
     *  更新地址
     */
    @NotBlank(message = "更新地址为空!")
    @ApiModelProperty(value = "更新地址", required = true)
    @Size(max = 100,message = "更新地址的长度不能超过100")
    private String address;
    /**
     *  更新方式
     */
    @NotBlank(message = "更新方式为空!")
    @ApiModelProperty(value = "更新方式", required = true)
    @Size(max = 100,message = "更新方式的长度不能超过100")
    private String method;
    /**
     *  系统
     */
    @NotBlank(message = "系统为空!")
    @ApiModelProperty(value = "系统", required = true)
    @Size(max = 100,message = "系统的长度不能超过100")
    private String systemType;
    /**
     *  更新内容
     */
    @ApiModelProperty(value = "更新内容", required = true)
    @Size(max = 200,message = "更新内容的长度不能超过200")
    private String content;

    /**
     * 更新时间
     * */
    @NotNull(message = "更新时间")
    @ApiModelProperty(value = "更新时间", required = true)
    private LocalDateTime updateTime;

}